package riven.club.demo.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.GenericGenerator;
import riven.club.common.entity.AbstractEntity;

import javax.persistence.*;

/**
 * uuid做主键
 * @author 陈浩
 * @date 2021-10-13 16:59
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "riven_club_jpa_student")
@Accessors(chain = true)
public class StudentP extends AbstractEntity {

    @Id
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @GeneratedValue(generator = "uuid")
    private String id;

    @Column(length = 32)
    private String username;
}
